Improve documentation, especially about parameter usage and the settings file#968
Merged
JamesWTruher merged 3 commits intoPowerShell:developmentfrom Apr 23, 2018
Merged
Conversation
7 tasks
kalgiz
approved these changes
Apr 13, 2018
docs/markdown/Invoke-Formatter.md
Outdated
| ## DESCRIPTION | ||
|
|
||
| The `Invoke-Formatter` cmdlet takes a string parameter named `ScriptDefinition` and formats it according to the input settings parameter `Settings`. If no `Settings` parameter is provided, the cmdlet assumes the default code formatting settings as defined in `Settings/CodeFormatting.psd`. | ||
| The Invoke-Formatter cmdlet takes a string parameter named ScriptDefinition and formats it according to the input settings parameter Settings. If no Settings parameter is provided, the cmdlet assumes the default code formatting settings as defined in Settings/CodeFormatting.psd1. |
Contributor
There was a problem hiding this comment.
Please remove extra space in "according to the input" part.
|
|
||
| ### -CustomRulePath | ||
| Adds the custom rules defined in the specified paths to the analysis. | ||
| Uses only the custom rules defined in the specified paths to the analysis. To still use the built-in rules, additionally use the -IncludeDefaultRules switch. |
Contributor
There was a problem hiding this comment.
maybe just "add the -IncludeDefaultRules switch" instead of "additionally use the -IncludeDefaultRules switch" to not repeat word "use" ?
| Resolve DSC resource dependency | ||
|
|
||
| Whenever Invoke-ScriptAnalyzer (isa) is run on a script having the dynamic keyword "Import-DSCResource -ModuleName <somemodule>", if <somemodule> is not present in any of the PSModulePath, isa gives parse error. This error is caused by the powershell parser not being able to find the symbol for <somemodule>. If isa finds the module on PowerShell Gallery (www.powershellgallery.com) then it downloads the missing module to a temp path. The temp path is then added to PSModulePath only for duration of the scan. The temp location can be found in $LOCALAPPDATA/PSScriptAnalyzer/TempModuleDir. | ||
| Whenever Invoke-ScriptAnalyzer is run on a script having the dynamic keyword "Import-DSCResource -ModuleName <somemodule>", if <somemodule> is not present in any of the PSModulePath, Invoke-ScriptAnalyzer gives parse error. This error is caused by the powershell parser not being able to find the symbol for <somemodule>. If Invoke-ScriptAnalyzer finds the module on PowerShell Gallery (www.powershellgallery.com) then it downloads the missing module to a temp path. The temp path is then added to PSModulePath only for duration of the scan. The temp location can be found in $LOCALAPPDATA/PSScriptAnalyzer/TempModuleDir. |
Contributor
There was a problem hiding this comment.
maybe "in PowerShell Gallery" ?
JamesWTruher
approved these changes
Apr 23, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Closes #675
Improve documentation, especially about parameter usage and the settings file.
Improve newlines (add/remove where appropriate.
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
xbetween the square brackets. Please mark anything not applicable to this PRNA.NAUser facing documentation neededNAMake sure you've added a new test if existing tests do not effectively test the code changedWIP:to the beginning of the title and remove the prefix when the PR is ready